package com.csx.springcloud.configcenter.apollo.sample;

import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;

/**
 * <p> what does this class do ? </p>
 * <p> How does it work ?</p>
 * <p> Why does it do this ?</p>
 *
 * @author cuisongxu
 * @date 2023/10/24 周二 14:43
 */

@SpringBootApplication
public class ApolloConfigCenterSampleApplication {

    public static void main(String[] args) {
        // 下面的设置也可以通过VM参数: -Dapollo.configService=http://192.168.2.11:30002 -Denv=DEV
        // 设置应用使用Apollo哪个环境的配置,默认为DEV
        System.setProperty("env", "DEV");
        // 如果Apollo是基于K8S部署的,需要设置该值.
        System.setProperty("apollo.configService", "http://106.55.103.14:8080");
        System.setProperty("apollo.autoUpdateInjectedSpringProperties", "false");
        SpringApplication.run(ApolloConfigCenterSampleApplication.class, args);
    }
}
